package sweezy.swf.tools.abcbuilder
{
	import sweezy.swf.tools.abcbuilder.utils.ElementList;

	public class ScriptDef extends ElementDef
	{

		private var _packageName:String;

		private var _privateMenbers:ElementList;

		private var _publicMember:MemberDef;

		public function ScriptDef()
		{
			_privateMenbers = new ElementList();
		}

		public function addPrivateMembers(member:MemberDef):void
		{
			_privateMenbers.addElement(member);
		}

		public function getPrivateMembers(uid:uint):MemberDef
		{
			return _privateMenbers.getElementByUID(uid) as MemberDef;
		}

		public function get numPrivateMembers():uint
		{
			return _privateMenbers.numElements;
		}

		public function get packageName():String
		{
			return _packageName;
		}

		public function set packageName(value:String):void
		{
			_packageName = value;
		}

		public function get privateMenbers():Array
		{
			return _privateMenbers.elements;
		}

		public function get publicMember():MemberDef
		{
			return _publicMember;
		}

		public function set publicMember(value:MemberDef):void
		{
			_publicMember = value;
		}

		public function removePrivateMembers(member:MemberDef):void
		{
			_privateMenbers.removeElement(member);
		}
	}
}
